
package com.vgtech.vantop;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesFactory {
	
	private static Properties config = new Properties();
	static{
		FileInputStream in = null;
//		String file = "E:\\vantop_sba\\config.properties";
		String file = "D:\\Sweep_the_code_download_service\\vantop_sba\\config.properties";
		try {
			in = new FileInputStream(file);
			config.load(in);
			in.close();
		} catch (IOException e) {
			if(in != null){
				try {
					in.close();
				} catch (IOException e1) {
					e1.printStackTrace();
				}
			}
			e.printStackTrace();
		}
	}
	
	public static String getValue(String daoName){
		String className = config.getProperty(daoName);
		return className;
	}
	
	public static void main(String[] args) {
		String fromEmail = PropertiesFactory.getValue("fileName-android");
		System.out.println("fromEmail: " + fromEmail);
	}
}
